// Import Vue
import Vue from 'vue';

// Import Framework7
import Framework7 from 'framework7/framework7-lite.esm.bundle.js';

// Import Framework7-Vue Plugin
import Framework7Vue from 'framework7-vue/framework7-vue.esm.bundle.js';

// Import Framework7 Styles
import 'framework7/css/framework7.bundle.css';

// Import Icons and App Custom Styles
import '../css/icons.css';
import '../css/app.scss';

// Import App Component
import App from '../components/app.vue';
import store from '../store'
import NoContentTips from '../ajComponents/no-content-tips'
import CustomInput from '../ajComponents/input'
import CustomPreloader from '../ajComponents/customPreloader';
import { Popup, Field, Button, Toast, Step, Steps, Tab, Tabs, DatetimePicker, Dialog, AddressList, AddressEdit, Card, CountDown,Grid, GridItem } from 'vant';
import VueClipboard from 'vue-clipboard2';
import Moment from 'moment';
import filters from '../filters'

Dialog.setDefaultOptions({
  title: i18n.t('m.dialog.title'),
  confirmButtonText: i18n.t('m.dialog.confirm'),
  cancelButtonText: i18n.t('m.dialog.cancel')
});
Vue.prototype.$moment = Moment;
Vue.prototype.$dialog = Dialog;


Vue.use(VueClipboard).use(Popup).use(Field).use(Button).use(Steps).use(Step).use(Tabs).use(Tab).use(DatetimePicker).use(AddressList).use(AddressEdit).use(Card).use(CountDown).use(Grid).use(GridItem);
Vue.component('no-content-tips', NoContentTips);
Vue.component('custom-input', CustomInput);
Vue.prototype.$toast = Toast;
Vue.prototype.$preloader = new CustomPreloader();
Vue.component('van-dialog', Dialog.Component);

// Init Framework7-Vue Plugin
Framework7.use(Framework7Vue);


// i18n
import i18n from "../i18n";

// Init App
new Vue({
  el: '#app',
  render: (h) => h(App),
  store,
  i18n,
  // Register App Component
  components: {
    app: App
  },
});
